<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.io.*"%>
<%@page import="java.io.File"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
	Class.forName("com.mysql.jdbc.Driver");					
	Connection conn=DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/toursim", "root", "gaoxing311");
	
	String sql="select * from senior";
	PreparedStatement ps=conn.prepareStatement(sql);
	
	ResultSet rs=ps.executeQuery();
 %>
 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index_main.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/isotope.css" media="screen" />
<link rel="stylesheet" href="js/fancybox/jquery.fancybox.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/da-slider.css" />
<!-- Owl Carousel Assets -->
<link href="js/owl-carousel/owl.carousel.css" rel="stylesheet">
<link rel="stylesheet" href="css/styles.css" />
<!-- Font Awesome -->
<link href="font/css/font-awesome.min.css" rel="stylesheet">
	
	<style type="text/css">
			
     </style>
  </head>
  
<body>
 	      <input type="button" style="color:#75CDE6 font-weight:900" value="搜索">
 	      <input type="text" style="color:#7FDFB6">
          <a style="color:#7FDFB6;font-size:30px">省</a>
          <input type="text" style="color:#7FDFB6">
        <a style="color:#7FDFB6;font-size:30px">市</a></div>
 	    <a style="color:#7FDFB6;font-size:30px">价格：</a>
          <input type="text" style="color:#7FDFB6">
          <a style="color:#7FDFB6;font-size:30px">~</a>
          <input type="text" style="color:#7FDFB6">
 	   
 	<hr color="#FF9999">
 	<!--Package-->
<section id="packages" class="secPad">
	<div class="container">
		<div class="heading text-center">
			<!-- Heading -->
			<h2>景点信息</h2>
		</div>
		<div class="row">
		<%
   			while(rs.next()){
   		%>
			<div class="col-md-4 col-sm-6">
						<div class="cuadro_intro_hover " style="background-color:#cccccc;" >
							<p style="text-align:center;">
							    <input type="hidden" name="pno" value="<%=rs.getInt(1) %>" />
								<img src="<%=rs.getString(8) %>" height="100%" width="100%">
							</p>
							<div class="caption">
								<div class="blur"></div>
								<div class="caption-text">
									<h3><%=rs.getString(2) %></h3>
									<p style="overflow-y:scroll; overflow-x:hidden;height:80px; width:250px; margin:auto; border:1px solid #666;"><%=rs.getString(4) %></p>
									<p>地址：<%=rs.getString(7) %></p>
									<p>门票：<%=rs.getString(3) %>&yen;</p>
									<a class=" btn btn-default" href="updatePage.jsp?id=<%=rs.getInt(1)%>"><i class="fa fa-chevron-circle-right">修改</i></a>  <a class=" btn btn-default" href="delete.jsp?id=<%=rs.getInt(1)%>"><i class="fa fa-chevron-circle-right">删除</i></a>
								</div>
							</div>
						</div>
					
			</div>
			<%
   			}
   		 %>
		</div>
</section>
 	
<script src="js/modernizr-latest.js"></script>
<script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/jquery.isotope.min.js" type="text/javascript"></script>
<script src="js/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>
<script src="js/jquery.nav.js" type="text/javascript"></script>
<script src="js/jquery.cslider.js" type="text/javascript"></script>
<script src="contact/jqBootstrapValidation.js"></script>
<script src="contact/contact_me.js"></script>
<script src="js/custom.js" type="text/javascript"></script>
<script src="js/owl-carousel/owl.carousel.js"></script>
    
</body>
</html>
